package com.kaishengit.util;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;

public class hibernateUtil {

	public hibernateUtil(){}
	
	public static Configuration cfg = new Configuration().configure();
	
	public static SessionFactory factory = cfg.buildSessionFactory();
	
	public static SessionFactory getSessionFactory(){
		return factory;
	}
	
	public static Session getSession(){
		return factory.getCurrentSession();
	}
	
}
